home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / regnpckg.sit / Picture WDEF / cards.xml < prev    next >
Text File  |  1990-12-10  |  36KB  |  834 lines

  1. card_7995.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>7995</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>2332</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>2</id>
  15.         <text><span class="style12">eading This Stack</span><span class="style1"></span><span class="style14">┼╕</span><span class="style1">┬á┬á┬á┬á┬áLeave stack and go (back) to the stack ΓÇ£Start HereΓÇ¥</span><span class="style14">ΓÇ║</span><span class="style1">┬á┬á┬á┬á┬á Go to next page, if mouse button held down will keep turning┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áthe pages. Right arrow key is linked</span><span class="style14">∩¼ü</span><span class="style1">┬á┬á┬á┬á┬á┬áAs above, but previous page. Left arrow key is linked.</span><span class="style6">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áClick to Continue</span></text>
  16.     </content>
  17.     <name>Help</name>
  18.     <script>on mouseUpvisual effect barn door closego to first cdend mouseUpon arrowKeyend arrowKeyon doMenuend doMenuon chooseend choose</script>
  19. </card>
  20.  
  21.  
  22. card_7598.xml
  23. <?xml version="1.0" encoding="utf-8" ?>
  24. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  25. <card>
  26.     <id>7598</id>
  27.     <filler1>0</filler1>
  28.     <cantDelete> <false /> </cantDelete>
  29.     <showPict> <true /> </showPict>
  30.     <dontSearch> <false /> </dontSearch>
  31.     <owner>2781</owner>
  32.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  33.     <part>
  34.         <id>1</id>
  35.         <type>button</type>
  36.         <visible> <true /> </visible>
  37.         <reserved5> 0 </reserved5>
  38.         <reserved4> 0 </reserved4>
  39.         <reserved3> 0 </reserved3>
  40.         <reserved2> 0 </reserved2>
  41.         <reserved1> 0 </reserved1>
  42.         <enabled> <true /> </enabled>
  43.         <rect>
  44.             <left>134</left>
  45.             <top>146</top>
  46.             <right>207</right>
  47.             <bottom>199</bottom>
  48.         </rect>
  49.         <style>opaque</style>
  50.         <showName> <true /> </showName>
  51.         <highlight> <false /> </highlight>
  52.         <autoHighlight> <false /> </autoHighlight>
  53.         <sharedHighlight> <true /> </sharedHighlight>
  54.         <family>0</family>
  55.         <titleWidth>0</titleWidth>
  56.         <icon>17343</icon>
  57.         <textAlign>center</textAlign>
  58.         <font>Chicago</font>
  59.         <textSize>12</textSize>
  60.         <textStyle>plain</textStyle>
  61.         <name>WDEF Demo</name>
  62.         <script>on mouseUpopen ":Picture Window ╞Æ:WDEF Demo"end mouseUp</script>
  63.     </part>
  64.     <part>
  65.         <id>3</id>
  66.         <type>button</type>
  67.         <visible> <true /> </visible>
  68.         <reserved5> 0 </reserved5>
  69.         <reserved4> 0 </reserved4>
  70.         <reserved3> 0 </reserved3>
  71.         <reserved2> 0 </reserved2>
  72.         <reserved1> 0 </reserved1>
  73.         <enabled> <true /> </enabled>
  74.         <rect>
  75.             <left>216</left>
  76.             <top>146</top>
  77.             <right>289</right>
  78.             <bottom>199</bottom>
  79.         </rect>
  80.         <style>opaque</style>
  81.         <showName> <true /> </showName>
  82.         <highlight> <false /> </highlight>
  83.         <autoHighlight> <false /> </autoHighlight>
  84.         <sharedHighlight> <true /> </sharedHighlight>
  85.         <family>0</family>
  86.         <titleWidth>0</titleWidth>
  87.         <icon>18898</icon>
  88.         <textAlign>center</textAlign>
  89.         <font>Chicago</font>
  90.         <textSize>12</textSize>
  91.         <textStyle>plain</textStyle>
  92.         <name>WDEF Demo ╧Ç</name>
  93.         <script>on mouseUpopen ":Picture Window ╞Æ:WDEF Demo ╧Ç" with "Think C"end mouseUp</script>
  94.     </part>
  95.     <content>
  96.         <layer>background</layer>
  97.         <id>3</id>
  98.         <text>Page 15 of 15</text>
  99.     </content>
  100.     <content>
  101.         <layer>background</layer>
  102.         <id>1</id>
  103.         <text>Demonstration of Picture Window</text>
  104.     </content>
  105.     <content>
  106.         <layer>background</layer>
  107.         <id>2</id>
  108.         <text><span class="style1">o demonstrate the use of the Picture WDEF a sample program is included which displays all 16 possible variations at thesame time and allows you to drag and resize them at will. To run this application use the ΓÇ£applicationΓÇ¥ icon button below (</span><span class="style3">do not</span><span class="style1"> do this in MF unless you have BMTR Init installed), to open the program in Think C use the ΓÇ£projectΓÇ¥ icon button.</span></text>
  109.     </content>
  110.     <name></name>
  111.     <script></script>
  112. </card>
  113.  
  114.  
  115. card_7830.xml
  116. <?xml version="1.0" encoding="utf-8" ?>
  117. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  118. <card>
  119.     <id>7830</id>
  120.     <filler1>0</filler1>
  121.     <cantDelete> <false /> </cantDelete>
  122.     <showPict> <true /> </showPict>
  123.     <dontSearch> <false /> </dontSearch>
  124.     <owner>2781</owner>
  125.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  126.     <content>
  127.         <layer>background</layer>
  128.         <id>3</id>
  129.         <text>Page 14 of 15</text>
  130.     </content>
  131.     <content>
  132.         <layer>background</layer>
  133.         <id>2</id>
  134.         <text><span class="style1">or example, the following code is taken from the loop in WDEF Demo program (see next page) which creates all 16 variants provided by the WDEF:</span><span class="style8">w[i] = NewWindow(NIL, &r2, "\p", true, PictWDEF | i, FRONTWIN,                 false, 0);/* NewWindow() will not draw the picture, calling CheckUpdate()   fixes this - all future updates will be handled by the WM */CheckUpdate(&event);</span><span class="style1">Once opened the window may be treated like any other window, except that only the primary type Picture Window has a content which can be written to. Also types other than Picture Window auto-update and no such events will be posted for them.</span></text>
  135.     </content>
  136.     <content>
  137.         <layer>background</layer>
  138.         <id>1</id>
  139.         <text>ΓǪOpening The Window</text>
  140.     </content>
  141.     <name></name>
  142.     <script></script>
  143. </card>
  144.  
  145.  
  146. card_7195.xml
  147. <?xml version="1.0" encoding="utf-8" ?>
  148. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  149. <card>
  150.     <id>7195</id>
  151.     <filler1>0</filler1>
  152.     <cantDelete> <false /> </cantDelete>
  153.     <showPict> <true /> </showPict>
  154.     <dontSearch> <false /> </dontSearch>
  155.     <owner>2781</owner>
  156.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  157.     <content>
  158.         <layer>background</layer>
  159.         <id>3</id>
  160.         <text>Page 13 of 15</text>
  161.     </content>
  162.     <content>
  163.         <layer>background</layer>
  164.         <id>1</id>
  165.         <text>iv) Opening The Window</text>
  166.     </content>
  167.     <content>
  168.         <layer>background</layer>
  169.         <id>2</id>
  170.         <text><span class="style1">o open a Picture window call NewWindow after setting up the globals passing ΓÇ£</span><span class="style8">PictWDEF</span><span class="style1"> | </span><span class="style2">primary type</span><span class="style1"> | </span><span class="style2">sub-type</span><span class="style1">ΓÇ¥ for the </span><span class="style2">procID</span><span class="style1">. The constants for the </span><span class="style2">procID</span><span class="style1">, which are defined in </span><span class="style2">PicWindow.h</span><span class="style1">, are:Picture WDEF:┬á┬á┬á┬á</span><span class="style8">PictWDEF</span><span class="style1">Primary Types:┬á┬á┬á┬á</span><span class="style8">PW_Lasso</span><span class="style1">, </span><span class="style8">PW_Mask</span><span class="style1">, </span><span class="style8">PW_PicMask</span><span class="style1"> & </span><span class="style8">PW_PicWind</span><span class="style1">Sub-types:┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style8">PW_AddFrame</span><span class="style1"> & </span><span class="style8">PW_SizeWind</span><span class="style1">Immediately after calling </span><span class="style2">NewWindow</span><span class="style1"> you should call </span><span class="style2">CheckUpdate</span><span class="style1">, this will cause the window picture to be displayed properly. If you do not do this the window picture will not be displayed until you next call </span><span class="style2">Get</span><span class="style1">/</span><span class="style2">WaitNextEvent</span><span class="style1">.</span></text>
  171.     </content>
  172.     <name></name>
  173.     <script></script>
  174. </card>
  175.  
  176.  
  177. card_7166.xml
  178. <?xml version="1.0" encoding="utf-8" ?>
  179. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  180. <card>
  181.     <id>7166</id>
  182.     <filler1>0</filler1>
  183.     <cantDelete> <false /> </cantDelete>
  184.     <showPict> <true /> </showPict>
  185.     <dontSearch> <false /> </dontSearch>
  186.     <owner>2781</owner>
  187.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  188.     <content>
  189.         <layer>background</layer>
  190.         <id>3</id>
  191.         <text>Page 12 of 15</text>
  192.     </content>
  193.     <content>
  194.         <layer>background</layer>
  195.         <id>1</id>
  196.         <text>ΓǪFilling In The Fields</text>
  197.     </content>
  198.     <content>
  199.         <layer>background</layer>
  200.         <id>2</id>
  201.         <text><span class="style3">xample: PICT from a resource file</span><span class="style1"></span><span class="style8">glob->pic = GetNamedResource('PICT', "\pButterfly");glob->clonePic = FALSE;glob->sharePic = TRUE;</span><span class="style1"></span><span class="style3">Example: Generated picture for one window</span><span class="style1"></span><span class="style8">glob->pic = OpenPicture(rect);</span><span class="style9">drawing calls</span><span class="style8">ClosePicture();glob->clonePic = FALSE;glob->sharePic = TRUE;</span></text>
  202.     </content>
  203.     <name></name>
  204.     <script></script>
  205. </card>
  206.  
  207.  
  208. card_6717.xml
  209. <?xml version="1.0" encoding="utf-8" ?>
  210. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  211. <card>
  212.     <id>6717</id>
  213.     <filler1>0</filler1>
  214.     <cantDelete> <false /> </cantDelete>
  215.     <showPict> <true /> </showPict>
  216.     <dontSearch> <false /> </dontSearch>
  217.     <owner>2781</owner>
  218.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  219.     <content>
  220.         <layer>background</layer>
  221.         <id>3</id>
  222.         <text>Page 11 of 15</text>
  223.     </content>
  224.     <content>
  225.         <layer>background</layer>
  226.         <id>1</id>
  227.         <text>ΓǪFilling In The Fields</text>
  228.     </content>
  229.     <content>
  230.         <layer>background</layer>
  231.         <id>2</id>
  232.         <text><span class="style3">lonePic & sharePic (cont)</span><span class="style1">:</span><span class="style2">┬á┬á┬á┬á┬áDetachResource</span><span class="style1"> if the </span><span class="style2">PicHandle</span><span class="style1"> in </span><span class="style2">pic</span><span class="style1"> is a resource, and </span><span class="style2">CloseWindow</span><span class="style1">┬á┬á┬á┬á┬áwill dispose of the picture.</span><span class="style3">cloneFrame & shareFrame</span><span class="style1">:┬á┬á┬á┬á┬áAs for </span><span class="style2">clonePic</span><span class="style1"> & </span><span class="style2">sharePic</span><span class="style1">, but apply to the </span><span class="style2">frame</span><span class="style1"> if used.This all sounds more complicated than it is! The common cases are: you have a </span><span class="style2">PicHandle</span><span class="style1"> you may later modify ΓÇô set </span><span class="style2">clonePic</span><span class="style1">/</span><span class="style2">Frame</span><span class="style1"> TRUE; you create a picture using </span><span class="style2">OpenPicture</span><span class="style1">/</span><span class="style2">ClosePicture</span><span class="style1"> to be used by a single window ΓÇô set </span><span class="style2">clonePic</span><span class="style1">/</span><span class="style2">Frame</span><span class="style1"> & </span><span class="style2">sharePic</span><span class="style1">/</span><span class="style2">Frame</span><span class="style1"> FALSE; you have a purgeable PICT resource ΓÇô set </span><span class="style2">clonePic</span><span class="style1">/</span><span class="style2">Frame</span><span class="style1"> FALSE & </span><span class="style2">sharePic</span><span class="style1">/</span><span class="style2">Frame</span><span class="style1"> TRUE.</span></text>
  233.     </content>
  234.     <name></name>
  235.     <script></script>
  236. </card>
  237.  
  238.  
  239. card_6499.xml
  240. <?xml version="1.0" encoding="utf-8" ?>
  241. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  242. <card>
  243.     <id>6499</id>
  244.     <filler1>0</filler1>
  245.     <cantDelete> <false /> </cantDelete>
  246.     <showPict> <true /> </showPict>
  247.     <dontSearch> <false /> </dontSearch>
  248.     <owner>2781</owner>
  249.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  250.     <content>
  251.         <layer>background</layer>
  252.         <id>3</id>
  253.         <text>Page 10 of 15</text>
  254.     </content>
  255.     <content>
  256.         <layer>background</layer>
  257.         <id>1</id>
  258.         <text>ΓǪFilling In The Fields</text>
  259.     </content>
  260.     <content>
  261.         <layer>background</layer>
  262.         <id>2</id>
  263.         <text><span class="style1">he following fields of the WDEFGlobals structure must be filled in, other fields should be left alone.</span><span class="style3">pic</span><span class="style1">:┬á┬á┬á┬á┬áThe </span><span class="style2">PicHandle</span><span class="style1"> of the content or content & structure picture.</span><span class="style3">frame</span><span class="style1">:┬á┬á┬á┬á┬áThe </span><span class="style2">PicHandle</span><span class="style1"> of the structure picture, if used.</span><span class="style3">clonePic & sharePic</span><span class="style1">:┬á┬á┬á┬á┬áIf </span><span class="style2">clonePic</span><span class="style1"> is TRUE then a clone (copy) of the </span><span class="style2">pic</span><span class="style1"> will be made by┬á┬á┬á┬á┬á</span><span class="style2">NewWindow,</span><span class="style1"> and </span><span class="style2">CloseWindow</span><span class="style1"> will dispose of it. If </span><span class="style2">clonePic</span><span class="style1"> is FASLE┬á┬á┬á┬á┬áthen </span><span class="style2">sharePic</span><span class="style1"> determines what happens. If </span><span class="style2">sharePic</span><span class="style1"> is TRUE,┬á┬á┬á┬á┬á</span><span class="style2">NewWindow</span><span class="style1"> just copies the </span><span class="style2">PicHandle</span><span class="style1"> in </span><span class="style2">pic</span><span class="style1"> and </span><span class="style2">CloseWindow</span><span class="style1"> does┬á┬á┬á┬á┬ánothing. If </span><span class="style2">sharePic</span><span class="style1"> is FALSE then </span><span class="style2">NewWindow</span><span class="style1"> will perform a</span></text>
  264.     </content>
  265.     <name></name>
  266.     <script></script>
  267. </card>
  268.  
  269.  
  270. card_6217.xml
  271. <?xml version="1.0" encoding="utf-8" ?>
  272. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  273. <card>
  274.     <id>6217</id>
  275.     <filler1>0</filler1>
  276.     <cantDelete> <false /> </cantDelete>
  277.     <showPict> <true /> </showPict>
  278.     <dontSearch> <false /> </dontSearch>
  279.     <owner>2781</owner>
  280.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  281.     <content>
  282.         <layer>background</layer>
  283.         <id>3</id>
  284.         <text>Page 9 of 15</text>
  285.     </content>
  286.     <content>
  287.         <layer>background</layer>
  288.         <id>1</id>
  289.         <text>iii) Setting The ΓÇ£GlobalsΓÇ¥</text>
  290.     </content>
  291.     <content>
  292.         <layer>background</layer>
  293.         <id>2</id>
  294.         <text><span class="style1">here is no standard way to communicate additional information to a non-standard WDEF when a window is created. Therefore, to pass the picture(s) to Picture WDEF a ΓÇ£globalΓÇ¥ structure </span><span class="style2">WDEFGlobals</span><span class="style1"> is used, its defintion is in the file </span><span class="style2">WDEFGlobals.h</span><span class="style1">. The function </span><span class="style2">GetWDEFGlobals()</span><span class="style1">, which can be found in the file </span><span class="style2">WDEFGlobals.c</span><span class="style1">, returns a pointer to the globals, it takes two arguments and returns an </span><span class="style2">OSErr</span><span class="style1"> value. The first argument should be </span><span class="style2">TRUE</span><span class="style1"> and the second the address of a </span><span class="style2">WDEFGlobalsPtr</span><span class="style1"> to be filled in with the globals address. The function will return </span><span class="style2">noErr</span><span class="style1"> or an error value if the globals cannot be accessed. For example, this code loads </span><span class="style2">glob</span><span class="style1"> with the globals address:</span><span class="style8">WDEFGlobalsPtr glob;if((err = GetWDEFGlobals(TRUE, &glob) != noErr) then </span><span class="style9">error code</span><span class="style8">;</span></text>
  295.     </content>
  296.     <name></name>
  297.     <script></script>
  298. </card>
  299.  
  300.  
  301. card_5071.xml
  302. <?xml version="1.0" encoding="utf-8" ?>
  303. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  304. <card>
  305.     <id>5071</id>
  306.     <filler1>0</filler1>
  307.     <cantDelete> <false /> </cantDelete>
  308.     <showPict> <true /> </showPict>
  309.     <dontSearch> <false /> </dontSearch>
  310.     <owner>2781</owner>
  311.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  312.     <content>
  313.         <layer>background</layer>
  314.         <id>3</id>
  315.         <text>Page 8 of 15</text>
  316.     </content>
  317.     <content>
  318.         <layer>background</layer>
  319.         <id>1</id>
  320.         <text>ii) Getting the Pictures</text>
  321.     </content>
  322.     <content>
  323.         <layer>background</layer>
  324.         <id>2</id>
  325.         <text><span class="style1">o create a Picture window you need one or two QuickDraw pictures. These pictures may be constructed using the </span><span class="style2">OpenPicture</span><span class="style1">/</span><span class="style2">ClosePicture</span><span class="style1"> pair along with the QuickDraw commands to define their contents; or read from a resource file  as </span><span class="style2">PICT</span><span class="style1">s using the traps </span><span class="style2">GetResource</span><span class="style1"> or </span><span class="style2">GetNamedResource</span><span class="style1">. To keep memory residency low, pictures in resource files can be </span><span class="style2">purgable</span><span class="style1">, Picture WDEF will load them as required.</span></text>
  326.     </content>
  327.     <name></name>
  328.     <script></script>
  329. </card>
  330.  
  331.  
  332. card_6109.xml
  333. <?xml version="1.0" encoding="utf-8" ?>
  334. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  335. <card>
  336.     <id>6109</id>
  337.     <filler1>0</filler1>
  338.     <cantDelete> <false /> </cantDelete>
  339.     <showPict> <true /> </showPict>
  340.     <dontSearch> <false /> </dontSearch>
  341.     <owner>2781</owner>
  342.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  343.     <part>
  344.         <id>2</id>
  345.         <type>button</type>
  346.         <visible> <true /> </visible>
  347.         <reserved5> 0 </reserved5>
  348.         <reserved4> 0 </reserved4>
  349.         <reserved3> 0 </reserved3>
  350.         <reserved2> 0 </reserved2>
  351.         <reserved1> 0 </reserved1>
  352.         <enabled> <true /> </enabled>
  353.         <rect>
  354.             <left>100</left>
  355.             <top>194</top>
  356.             <right>178</right>
  357.             <bottom>240</bottom>
  358.         </rect>
  359.         <style>opaque</style>
  360.         <showName> <true /> </showName>
  361.         <highlight> <false /> </highlight>
  362.         <autoHighlight> <false /> </autoHighlight>
  363.         <sharedHighlight> <true /> </sharedHighlight>
  364.         <family>0</family>
  365.         <titleWidth>0</titleWidth>
  366.         <icon>18898</icon>
  367.         <textAlign>center</textAlign>
  368.         <font>Chicago</font>
  369.         <textSize>12</textSize>
  370.         <textStyle>plain</textStyle>
  371.         <name>BMTR Patcher ╧Ç</name>
  372.         <script>on mouseUpopen ":BitMapToRegion ╞Æ:" & the short name of the target with "Think C"end mouseUp</script>
  373.     </part>
  374.     <part>
  375.         <id>1</id>
  376.         <type>button</type>
  377.         <visible> <true /> </visible>
  378.         <reserved5> 0 </reserved5>
  379.         <reserved4> 0 </reserved4>
  380.         <reserved3> 0 </reserved3>
  381.         <reserved2> 0 </reserved2>
  382.         <reserved1> 0 </reserved1>
  383.         <enabled> <true /> </enabled>
  384.         <rect>
  385.             <left>23</left>
  386.             <top>194</top>
  387.             <right>101</right>
  388.             <bottom>240</bottom>
  389.         </rect>
  390.         <style>opaque</style>
  391.         <showName> <true /> </showName>
  392.         <highlight> <false /> </highlight>
  393.         <autoHighlight> <false /> </autoHighlight>
  394.         <sharedHighlight> <true /> </sharedHighlight>
  395.         <family>0</family>
  396.         <titleWidth>0</titleWidth>
  397.         <icon>18898</icon>
  398.         <textAlign>center</textAlign>
  399.         <font>Chicago</font>
  400.         <textSize>12</textSize>
  401.         <textStyle>plain</textStyle>
  402.         <name>BMTR Trap ╧Ç</name>
  403.         <script>on mouseUpopen ":BitMapToRegion ╞Æ:" & the short name of the target with "Think C"end mouseUp</script>
  404.     </part>
  405.     <part>
  406.         <id>3</id>
  407.         <type>button</type>
  408.         <visible> <true /> </visible>
  409.         <reserved5> 0 </reserved5>
  410.         <reserved4> 0 </reserved4>
  411.         <reserved3> 0 </reserved3>
  412.         <reserved2> 0 </reserved2>
  413.         <reserved1> 0 </reserved1>
  414.         <enabled> <true /> </enabled>
  415.         <rect>
  416.             <left>237</left>
  417.             <top>194</top>
  418.             <right>315</right>
  419.             <bottom>240</bottom>
  420.         </rect>
  421.         <style>opaque</style>
  422.         <showName> <true /> </showName>
  423.         <highlight> <false /> </highlight>
  424.         <autoHighlight> <false /> </autoHighlight>
  425.         <sharedHighlight> <true /> </sharedHighlight>
  426.         <family>0</family>
  427.         <titleWidth>0</titleWidth>
  428.         <icon>18898</icon>
  429.         <textAlign>center</textAlign>
  430.         <font>Chicago</font>
  431.         <textSize>12</textSize>
  432.         <textStyle>plain</textStyle>
  433.         <name>BMTR Init ╧Ç</name>
  434.         <script>on mouseUpopen ":BitMapToRegion ╞Æ:" & the short name of the target with "Think C"end mouseUp</script>
  435.     </part>
  436.     <part>
  437.         <id>4</id>
  438.         <type>button</type>
  439.         <visible> <true /> </visible>
  440.         <reserved5> 0 </reserved5>
  441.         <reserved4> 0 </reserved4>
  442.         <reserved3> 0 </reserved3>
  443.         <reserved2> 0 </reserved2>
  444.         <reserved1> 0 </reserved1>
  445.         <enabled> <true /> </enabled>
  446.         <rect>
  447.             <left>314</left>
  448.             <top>194</top>
  449.             <right>392</right>
  450.             <bottom>240</bottom>
  451.         </rect>
  452.         <style>opaque</style>
  453.         <showName> <true /> </showName>
  454.         <highlight> <false /> </highlight>
  455.         <autoHighlight> <false /> </autoHighlight>
  456.         <sharedHighlight> <true /> </sharedHighlight>
  457.         <family>0</family>
  458.         <titleWidth>0</titleWidth>
  459.         <icon>18898</icon>
  460.         <textAlign>center</textAlign>
  461.         <font>Chicago</font>
  462.         <textSize>12</textSize>
  463.         <textStyle>plain</textStyle>
  464.         <name>BMTR XCMD ╧Ç</name>
  465.         <script>on mouseUpopen ":BitMapToRegion ╞Æ:" & the short name of the target with "Think C"end mouseUp</script>
  466.     </part>
  467.     <content>
  468.         <layer>background</layer>
  469.         <id>3</id>
  470.         <text>Page 7 of 15</text>
  471.     </content>
  472.     <content>
  473.         <layer>background</layer>
  474.         <id>1</id>
  475.         <text><span class="style1">) The </span><span class="style6">BitMapToRegion</span><span class="style1"> TRAP</span></text>
  476.     </content>
  477.     <content>
  478.         <layer>background</layer>
  479.         <id>2</id>
  480.         <text><span class="style1">he Picture WDEF uses the trap </span><span class="style2">BitMapToRegion</span><span class="style1">. This trap is currently only provided by systems which are running 32-bit QuickDraw. If your system is not running 32bQD (or you don't know) you need to install the </span><span class="style2">public domain</span><span class="style1"> version of this trap, this was written by myself based on a C function by Juri Munkki. There are three ways to install this patch; using the ΓÇ£BMTR InitΓÇ¥ INIT, running the ΓÇ£BMTR PatcherΓÇ¥ application </span><span class="style2">under the Finder</span><span class="style1">, or using the ΓÇ£install_BMTRΓÇ¥ XCMD. The INIT & XCMD will only install the trap if it does not exist, the patcher will toggle the installation of the trap. Source code for the trap, patcher, INIT & XCMD are included in this package as THINK C projects.</span></text>
  481.     </content>
  482.     <name></name>
  483.     <script></script>
  484. </card>
  485.  
  486.  
  487. card_4643.xml
  488. <?xml version="1.0" encoding="utf-8" ?>
  489. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  490. <card>
  491.     <id>4643</id>
  492.     <filler1>0</filler1>
  493.     <cantDelete> <false /> </cantDelete>
  494.     <showPict> <true /> </showPict>
  495.     <dontSearch> <false /> </dontSearch>
  496.     <owner>2781</owner>
  497.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  498.     <content>
  499.         <layer>background</layer>
  500.         <id>3</id>
  501.         <text>Page 6 of 15</text>
  502.     </content>
  503.     <content>
  504.         <layer>background</layer>
  505.         <id>1</id>
  506.         <text>Using The Picture WDEF</text>
  507.     </content>
  508.     <content>
  509.         <layer>background</layer>
  510.         <id>2</id>
  511.         <text><span class="style1">ou may use Picture WDEF in your own programs, remember however that if you do so you must give them away free, or negotiate with me. There are four stages to creating a window with the Picture WDEF:i)┬á┬á┬áMake sure the trap </span><span class="style2">BitMapToRegion</span><span class="style1"> exists on your system.ii) ┬áGet </span><span class="style2">PicHandle</span><span class="style1">(s) for the QuickDraw picture(s).iii)┬áSetup the Picture WDEF ΓÇ£globalsΓÇ¥.iv)┬áCall </span><span class="style2">NewWindow.</span></text>
  512.     </content>
  513.     <name></name>
  514.     <script></script>
  515. </card>
  516.  
  517.  
  518. card_4598.xml
  519. <?xml version="1.0" encoding="utf-8" ?>
  520. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  521. <card>
  522.     <id>4598</id>
  523.     <filler1>0</filler1>
  524.     <cantDelete> <false /> </cantDelete>
  525.     <showPict> <true /> </showPict>
  526.     <dontSearch> <false /> </dontSearch>
  527.     <owner>2781</owner>
  528.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  529.     <content>
  530.         <layer>background</layer>
  531.         <id>1</id>
  532.         <text>The Sub-Types</text>
  533.     </content>
  534.     <content>
  535.         <layer>background</layer>
  536.         <id>3</id>
  537.         <text>Page 5 of 15</text>
  538.     </content>
  539.     <content>
  540.         <layer>background</layer>
  541.         <id>2</id>
  542.         <text><span class="style1">here are two sub-types; neither, one or both may be combined witheach primary type to yeild a total of four variations.</span><span class="style3">Framed</span><span class="style1">. A one pixel wide border is added to the structure region. This is drawn in black when the window is active, and gray when inactive.</span><span class="style3">Size to Picture</span><span class="style1">. This type sizes the window to match the </span><span class="style2">picFrame</span><span class="style1"> of the picture used to form the structure region. The top left corner of the rectangle passed to </span><span class="style2">NewWindow</span><span class="style1"> is used to locate the window. The window may still be resized subsequently using </span><span class="style2">SizeWindow</span><span class="style1"> like any other window.</span></text>
  543.     </content>
  544.     <name></name>
  545.     <script></script>
  546. </card>
  547.  
  548.  
  549. card_4237.xml
  550. <?xml version="1.0" encoding="utf-8" ?>
  551. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  552. <card>
  553.     <id>4237</id>
  554.     <filler1>0</filler1>
  555.     <cantDelete> <false /> </cantDelete>
  556.     <showPict> <true /> </showPict>
  557.     <dontSearch> <false /> </dontSearch>
  558.     <owner>2781</owner>
  559.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  560.     <content>
  561.         <layer>background</layer>
  562.         <id>1</id>
  563.         <text>ΓǪThe Primary Types</text>
  564.     </content>
  565.     <content>
  566.         <layer>background</layer>
  567.         <id>2</id>
  568.         <text><span class="style3">icture Window</span><span class="style1">. This type is formed from two pictures. The union of the black pixels of both pictures are used to form the structure region, the black pixels of the second are used to form the content region. No </span><span class="style2">windowPic</span><span class="style1"> is setup. This produces a window whose structure consists of one or more areas, which may contain holes, within which there is an arbitrary shaped content region. Normal update events are posted for the window and an application may draw within the content region as for standard windows.</span></text>
  569.     </content>
  570.     <content>
  571.         <layer>background</layer>
  572.         <id>3</id>
  573.         <text>Page 4 of 15</text>
  574.     </content>
  575.     <name></name>
  576.     <script></script>
  577. </card>
  578.  
  579.  
  580. card_3905.xml
  581. <?xml version="1.0" encoding="utf-8" ?>
  582. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  583. <card>
  584.     <id>3905</id>
  585.     <filler1>0</filler1>
  586.     <cantDelete> <false /> </cantDelete>
  587.     <showPict> <true /> </showPict>
  588.     <dontSearch> <false /> </dontSearch>
  589.     <owner>2781</owner>
  590.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  591.     <content>
  592.         <layer>background</layer>
  593.         <id>2</id>
  594.         <text><span class="style2">Lassoed PictureΓǪ)</span><span class="style1"> is automatically painted with the picture by the window manager and may contain white as well as black areas. No update events will be posted for the window.</span><span class="style3">Picture Masked Picture</span><span class="style1">. This type is formed from two pictures. The black pixels of the first picture are used to form both the structure and content regions of the window. The second picture is used for the </span><span class="style2">windowPic</span><span class="style1">. This type is a generalisation of the previous two and allows windows to be constructed which consist of multiple non-contiguous areas, contain holes, and display a picture which is a different shape to that of the window. Updating is again automatic.</span></text>
  595.     </content>
  596.     <content>
  597.         <layer>background</layer>
  598.         <id>1</id>
  599.         <text>ΓǪThe Primary Types</text>
  600.     </content>
  601.     <content>
  602.         <layer>background</layer>
  603.         <id>3</id>
  604.         <text>Page 3 of 15</text>
  605.     </content>
  606.     <name></name>
  607.     <script></script>
  608. </card>
  609.  
  610.  
  611. card_3774.xml
  612. <?xml version="1.0" encoding="utf-8" ?>
  613. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  614. <card>
  615.     <id>3774</id>
  616.     <filler1>0</filler1>
  617.     <cantDelete> <false /> </cantDelete>
  618.     <showPict> <true /> </showPict>
  619.     <dontSearch> <false /> </dontSearch>
  620.     <owner>2781</owner>
  621.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  622.     <content>
  623.         <layer>background</layer>
  624.         <id>1</id>
  625.         <text>The Primary Types</text>
  626.     </content>
  627.     <content>
  628.         <layer>background</layer>
  629.         <id>3</id>
  630.         <text>Page 2 of 15</text>
  631.     </content>
  632.     <content>
  633.         <layer>background</layer>
  634.         <id>2</id>
  635.         <text><span class="style3">asked Picture</span><span class="style1">. This type is constructed from a single picture. The structure  & content regions of the window are both formed from the black pixels in the picture. The </span><span class="style2">windowPic</span><span class="style1"> of the window is also set to the same picture. This results in a window area which is completely black and may contain non-contiguous regions and/or holes. The window is automatically updated by the window manager and no update events will be posted for it.</span><span class="style3">Lassoed Picture</span><span class="style1">. This type is constructed from a single picture. The structure & content regions are formed by lassoing the picture, as though with the MacPaint/HyperCard lasso tool. The </span><span class="style2">windowPic</span><span class="style1"> is set to the picture. This results in a window area which may consist of non-contiguous areas but will contain no holes. The window area</span></text>
  636.     </content>
  637.     <name></name>
  638.     <script></script>
  639. </card>
  640.  
  641.  
  642. card_2867.xml
  643. <?xml version="1.0" encoding="utf-8" ?>
  644. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  645. <card>
  646.     <id>2867</id>
  647.     <filler1>0</filler1>
  648.     <cantDelete> <false /> </cantDelete>
  649.     <showPict> <true /> </showPict>
  650.     <dontSearch> <false /> </dontSearch>
  651.     <owner>2781</owner>
  652.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  653.     <content>
  654.         <layer>background</layer>
  655.         <id>1</id>
  656.         <text>Introduction</text>
  657.     </content>
  658.     <content>
  659.         <layer>background</layer>
  660.         <id>3</id>
  661.         <text>Page 1 of 15</text>
  662.     </content>
  663.     <content>
  664.         <layer>background</layer>
  665.         <id>2</id>
  666.         <text><span class="style1">he Picture WDEF constructs a window from one or two standard QuickDraw pictures. The WDEF provides four primary types of window, each of which may modified by two sub-types, giving a total of 16 variations. The four primary types are: Masked Picture; Lassoed Picture; Picture Masked Picture; and Picture Window. The type of the window determines how the structure and content regions are defined. The two sub-types are Framed and Size to Picture.┬á┬á┬á┬á┬áPicture is an </span><span class="style2">almost</span><span class="style1"> standard WDEFΓǪ Unfortunately there is no standard way of communicating extra information to a WDEF, such as the one or two pictures for Picture. Therefore Picture windows must be opened in a special way, after which they behave like standard windows.</span></text>
  667.     </content>
  668.     <name></name>
  669.     <script></script>
  670. </card>
  671.  
  672.  
  673. card_5541.xml
  674. <?xml version="1.0" encoding="utf-8" ?>
  675. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  676. <card>
  677.     <id>5541</id>
  678.     <filler1>0</filler1>
  679.     <bitmap>BMAP_5763.pbm</bitmap>
  680.     <cantDelete> <false /> </cantDelete>
  681.     <showPict> <true /> </showPict>
  682.     <dontSearch> <false /> </dontSearch>
  683.     <owner>5304</owner>
  684.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  685.     <part>
  686.         <id>7</id>
  687.         <type>button</type>
  688.         <visible> <true /> </visible>
  689.         <reserved5> 0 </reserved5>
  690.         <reserved4> 0 </reserved4>
  691.         <reserved3> 0 </reserved3>
  692.         <reserved2> 0 </reserved2>
  693.         <reserved1> 0 </reserved1>
  694.         <enabled> <true /> </enabled>
  695.         <rect>
  696.             <left>232</left>
  697.             <top>180</top>
  698.             <right>268</right>
  699.             <bottom>210</bottom>
  700.         </rect>
  701.         <style>transparent</style>
  702.         <showName> <false /> </showName>
  703.         <highlight> <false /> </highlight>
  704.         <autoHighlight> <false /> </autoHighlight>
  705.         <sharedHighlight> <true /> </sharedHighlight>
  706.         <family>0</family>
  707.         <titleWidth>0</titleWidth>
  708.         <icon>26425</icon>
  709.         <textAlign>center</textAlign>
  710.         <font>Chicago</font>
  711.         <textSize>12</textSize>
  712.         <textStyle>plain</textStyle>
  713.         <name>Next</name>
  714.         <script>on mouseUpvisual effect wipe leftgo nextend mouseUp</script>
  715.     </part>
  716.     <part>
  717.         <id>8</id>
  718.         <type>button</type>
  719.         <visible> <true /> </visible>
  720.         <reserved5> 0 </reserved5>
  721.         <reserved4> 0 </reserved4>
  722.         <reserved3> 0 </reserved3>
  723.         <reserved2> 0 </reserved2>
  724.         <reserved1> 0 </reserved1>
  725.         <enabled> <true /> </enabled>
  726.         <rect>
  727.             <left>191</left>
  728.             <top>180</top>
  729.             <right>227</right>
  730.             <bottom>210</bottom>
  731.         </rect>
  732.         <style>transparent</style>
  733.         <showName> <false /> </showName>
  734.         <highlight> <false /> </highlight>
  735.         <autoHighlight> <false /> </autoHighlight>
  736.         <sharedHighlight> <true /> </sharedHighlight>
  737.         <family>0</family>
  738.         <titleWidth>0</titleWidth>
  739.         <icon>28023</icon>
  740.         <textAlign>center</textAlign>
  741.         <font>Chicago</font>
  742.         <textSize>12</textSize>
  743.         <textStyle>plain</textStyle>
  744.         <name>Intro</name>
  745.         <script>on mouseUpvisual effect dissolve to grayvisual effect dissolvego to stack "Start Here"end mouseUp</script>
  746.     </part>
  747.     <part>
  748.         <id>9</id>
  749.         <type>button</type>
  750.         <visible> <true /> </visible>
  751.         <reserved5> 0 </reserved5>
  752.         <reserved4> 0 </reserved4>
  753.         <reserved3> 0 </reserved3>
  754.         <reserved2> 0 </reserved2>
  755.         <reserved1> 0 </reserved1>
  756.         <enabled> <true /> </enabled>
  757.         <rect>
  758.             <left>150</left>
  759.             <top>180</top>
  760.             <right>186</right>
  761.             <bottom>210</bottom>
  762.         </rect>
  763.         <style>transparent</style>
  764.         <showName> <false /> </showName>
  765.         <highlight> <false /> </highlight>
  766.         <autoHighlight> <false /> </autoHighlight>
  767.         <sharedHighlight> <true /> </sharedHighlight>
  768.         <family>0</family>
  769.         <titleWidth>0</titleWidth>
  770.         <icon>1011</icon>
  771.         <textAlign>center</textAlign>
  772.         <font>Chicago</font>
  773.         <textSize>12</textSize>
  774.         <textStyle>plain</textStyle>
  775.         <name>Home</name>
  776.         <script>on mouseUpgo homeend mouseUp</script>
  777.     </part>
  778.     <part>
  779.         <id>11</id>
  780.         <type>button</type>
  781.         <visible> <true /> </visible>
  782.         <reserved5> 0 </reserved5>
  783.         <reserved4> 0 </reserved4>
  784.         <reserved3> 0 </reserved3>
  785.         <reserved2> 0 </reserved2>
  786.         <reserved1> 0 </reserved1>
  787.         <enabled> <true /> </enabled>
  788.         <rect>
  789.             <left>390</left>
  790.             <top>187</top>
  791.             <right>416</right>
  792.             <bottom>211</bottom>
  793.         </rect>
  794.         <style>opaque</style>
  795.         <showName> <false /> </showName>
  796.         <highlight> <false /> </highlight>
  797.         <autoHighlight> <false /> </autoHighlight>
  798.         <sharedHighlight> <true /> </sharedHighlight>
  799.         <family>0</family>
  800.         <titleWidth>0</titleWidth>
  801.         <icon>25002</icon>
  802.         <textAlign>center</textAlign>
  803.         <font>Chicago</font>
  804.         <textSize>12</textSize>
  805.         <textStyle>plain</textStyle>
  806.         <name>New Button</name>
  807.         <script>on mouseUpvisual effect barn door opengo cd "Help"end mouseUp</script>
  808.     </part>
  809.     <content>
  810.         <layer>background</layer>
  811.         <id>2</id>
  812.         <text>Picture WDEF</text>
  813.     </content>
  814.     <content>
  815.         <layer>background</layer>
  816.         <id>3</id>
  817.         <text><span class="style7">tack & Code Resources ┬⌐ 1990, Nigel PerryFree for personal use and for use in stacks & applications which are free, provided this copyright notice and conditions of use are clearly displayed. May not be used for commercial or profit-making purposes or in ShareWare without permission. Code resources written in THINK C ┬⌐ Symantec.</span></text>
  818.     </content>
  819.     <content>
  820.         <layer>background</layer>
  821.         <id>5</id>
  822.         <text>Picture WDEF is a window defintion procedure for arbitrary shaped windows. The structure region and content region or contents are defined using QuickDraw pictures.</text>
  823.     </content>
  824.     <content>
  825.         <layer>background</layer>
  826.         <id>6</id>
  827.         <text><span class="style1">igel Perry, Dept of Computing, Imperial College, 180 Queens Gate, London SW7, UKEmail: np@doc.ic.ac.uk</span><span class="style11"></span></text>
  828.     </content>
  829.     <name></name>
  830.     <script>on arrowKey whichif which is "Right" thensend mouseUp to btn "Next"elseif which is not "Left" thenpass arrowKeyend ifend ifend arrowKey</script>
  831. </card>
  832.  
  833.  
  834.